#ifndef CLIENTSOCKET_H
#define CLIENTSOCKET_H

#include <QtNetwork>

class ClientSocket : public QTcpSocket
{
    Q_OBJECT

public:
    ClientSocket(QObject *parent = 0);

private slots:
    void readIncomingUsername();

private:
    void generateReply(const QString &reply);
    bool usernameExists(const QString &username);
    void initializeUser(const QString &username);
    quint16 nextBlockSize;
};

#endif
